package com.jrzh.mvc.model.sys;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.jrzh.framework.annotation.UniqueValue;
import com.jrzh.framework.base.model.GeneralModel;
@Entity
@Table(name="sys_resources")
public class ResourcesModel extends GeneralModel implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name="_pid")
	private String pid;
	
	@Column(name="_is_leaf")
	private Boolean isLeaf;
	
	@Column(name="_expanded")
	private Boolean expanded;
	
	@Column(name="_level")
	private Integer level;
	
	@Column(name="_parent_id")
	private String parentId;
	
	@Column(name="_code")
	@NotNull(message="resource.code.validate.not_null")
	@UniqueValue(message = "resource.code.validate.unique")
	private String code;
	
	
	@Column(name="_type")
	@NotNull(message="resource.type.validate.not_null")
	private Integer type;
	
	
	@Column(name="_name")
	@NotNull(message="resource.name.validate.not_null")
	private String name;
	
	@Column(name="_icon")
	private String icon;
	
	@Column(name="_url")
	private String url;
	
	@Column(name="_remark")
	@Size(min = 0, max = 500)
	private String remark;
	/**
	 * 是否为自定义表单关联菜单
	 */
	@Column(name = "_is_custom")
	private Boolean isCustom;
	
	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Boolean getExpanded() {
		return expanded;
	}

	public void setExpanded(Boolean expanded) {
		this.expanded = expanded;
	}

	public Boolean getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(Boolean isLeaf) {
		this.isLeaf = isLeaf;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public Boolean getIsCustom() {
		return isCustom;
	}

	public void setIsCustom(Boolean isCustom) {
		this.isCustom = isCustom;
	}
	

}
